package com.dy.design_pattern_study.state_pattern.dome3.entry;

import com.dy.design_pattern_study.state_pattern.dome3.State;
import com.dy.design_pattern_study.state_pattern.dome3.impl.ForenoonState;
import lombok.Data;

/**
 * @CreateBy zhangdingyi
 * @Date 2023-04-06
 * @Content
 */
@Data
public class Work {
    private int hour;
    private boolean finish = false;
    private State state;

    //初始状态
    public Work() {
        state = new ForenoonState();
    }

    //下一个状态
    public void writeProgram() {
        state.writeProgram(this);
    }
}
